/*
Navicat MySQL Data Transfer

Source Server         : 本地
Source Server Version : 50536
Source Host           : 127.0.0.1:3306
Source Database       : Hkcms

Target Server Type    : MYSQL
Target Server Version : 50536
File Encoding         : 65001

Date: 2014-06-14 11:40:16
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for hkcms_access
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_access`;
CREATE TABLE `hkcms_access` (
  `role_id` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '角色id',
  `app` varchar(20) NOT NULL DEFAULT '' COMMENT '模块',
  `controller` varchar(20) NOT NULL DEFAULT '' COMMENT '控制器',
  `action` varchar(20) NOT NULL DEFAULT '' COMMENT '方法',
  `status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '是否有效',
  KEY `role_id` (`role_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='角色权限表';

-- ----------------------------
-- Records of hkcms_access
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_admin_panel
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_admin_panel`;
CREATE TABLE `hkcms_admin_panel` (
  `mid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '菜单ID',
  `userid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '用户ID',
  `name` char(32) NOT NULL DEFAULT '' COMMENT '菜单名',
  `url` char(255) NOT NULL DEFAULT '' COMMENT '菜单地址',
  UNIQUE KEY `userid` (`mid`,`userid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='常用菜单';

-- ----------------------------
-- Records of hkcms_admin_panel
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_attachment
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_attachment`;
CREATE TABLE `hkcms_attachment` (
  `aid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '附件ID',
  `module` char(15) NOT NULL DEFAULT '' COMMENT '模块名称',
  `catid` smallint(5) NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `filename` char(50) NOT NULL DEFAULT '' COMMENT '上传附件名称',
  `filepath` char(200) NOT NULL DEFAULT '' COMMENT '附件路径',
  `filesize` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '附件大小',
  `fileext` char(10) NOT NULL DEFAULT '' COMMENT '附件扩展名',
  `isimage` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为图片 1为图片',
  `isthumb` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为缩略图 1为缩略图',
  `userid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '上传用户ID',
  `isadmin` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否后台用户上传',
  `uploadtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '上传时间',
  `uploadip` char(15) NOT NULL DEFAULT '' COMMENT '上传ip',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '附件使用状态',
  `authcode` char(32) NOT NULL DEFAULT '' COMMENT '附件路径MD5值',
  PRIMARY KEY (`aid`),
  KEY `authcode` (`authcode`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='附件表';

-- ----------------------------
-- Records of hkcms_attachment
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_attachment_index
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_attachment_index`;
CREATE TABLE `hkcms_attachment_index` (
  `keyid` char(30) NOT NULL DEFAULT '' COMMENT '关联id',
  `aid` char(10) NOT NULL DEFAULT '' COMMENT '附件ID',
  KEY `keyid` (`keyid`),
  KEY `aid` (`aid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='附件关系表';

-- ----------------------------
-- Records of hkcms_attachment_index
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_behavior
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_behavior`;
CREATE TABLE `hkcms_behavior` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` char(30) NOT NULL DEFAULT '' COMMENT '行为唯一标识',
  `title` char(80) NOT NULL DEFAULT '' COMMENT '行为说明',
  `remark` char(140) NOT NULL DEFAULT '' COMMENT '行为描述',
  `type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1-控制器，2-视图',
  `status` tinyint(2) NOT NULL DEFAULT '0' COMMENT '状态（0：禁用，1：正常）',
  `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统',
  `module` char(20) NOT NULL DEFAULT '' COMMENT '所属模块',
  `datetime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '修改时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='系统行为表';

-- ----------------------------
-- Records of hkcms_behavior
-- ----------------------------
INSERT INTO `hkcms_behavior` VALUES (1,'app_init','应用初始化标签位','应用初始化标签位',1,1,1,'',1381021393);
INSERT INTO `hkcms_behavior` VALUES (2,'app_begin','应用开始标签位','应用开始标签位',1,1,1,'',1381021424);
INSERT INTO `hkcms_behavior` VALUES (3,'module_init','模块初始化','模块初始化',1,1,1,'',1562743093);
INSERT INTO `hkcms_behavior` VALUES (4,'action_begin','操作开始执行','操作开始执行',1,1,1,'',1381021450);
INSERT INTO `hkcms_behavior` VALUES (5,'view_filter','视图输出过滤标签位','视图输出过滤标签位',1,1,1,'',1381021621);
INSERT INTO `hkcms_behavior` VALUES (6,'app_end','应用结束标签位','应用结束标签位',1,1,1,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (7,'log_write','日志write方法标签位','日志write方法标签位',1,1,1,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (8,'log_write_done','日志写入完成标签位','日志写入完成标签位',1,1,1,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (9,'response_send','响应发送标签位','响应发送标签位',1,1,1,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (10,'response_end','输出结束标签位','输出结束标签位',1,1,1,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (11,'admin_public_tologin','增加登陆成功钩子','增加登陆成功钩子',1,1,0,'admin',1381021654);
INSERT INTO `hkcms_behavior` VALUES (12,'admin_public_tologin_error','增加登陆失败钩子','增加登陆失败钩子',1,1,0,'admin',1381021654);
INSERT INTO `hkcms_behavior` VALUES (13,'ajax_return','ajaxReturn自定义返回数据钩子','位于hkcms.php下的ajaxReturn方法、不是JSON、XML、JSONP、EVAL类型的钩子',1,1,0,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (14,'app_dispatch','应用调度信息','应用调度信息',1,1,1,'',1381021654);
INSERT INTO `hkcms_behavior` VALUES (15,'view_nav_menu','前台菜单标签位','前台菜单标签位',2,1,0,'',1381021654);

-- ----------------------------
-- Table structure for hkcms_behavior_log
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_behavior_log`;
CREATE TABLE `hkcms_behavior_log` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `ruleid` int(10) NOT NULL DEFAULT '0' COMMENT '行为ID',
  `guid` char(50) NOT NULL DEFAULT '' COMMENT '标识',
  `create_time` int(10) NOT NULL DEFAULT '0' COMMENT '执行行为的时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='行为日志';

-- ----------------------------
-- Records of hkcms_behavior_log
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_behavior_rule
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_behavior_rule`;
CREATE TABLE `hkcms_behavior_rule` (
  `ruleid` int(11) NOT NULL AUTO_INCREMENT COMMENT '主键',
  `behaviorid` int(11) NOT NULL DEFAULT '0' COMMENT '行为id',
  `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统',
  `module` char(20) NOT NULL DEFAULT '' COMMENT '规则所属模块',
  `addons` char(20) NOT NULL DEFAULT '' COMMENT '规则所属插件',
  `rule` text COMMENT '行为规则',
  `listorder` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `datetime` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
  PRIMARY KEY (`ruleid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='行为规则表';

-- ----------------------------
-- Records of hkcms_behavior_rule
-- ----------------------------
INSERT INTO `hkcms_behavior_rule` VALUES (1,1,1,'','','phpfile:AppInitBehavior',0,1381021954);
INSERT INTO `hkcms_behavior_rule` VALUES (2,2,1,'','','phpfile:AppBeginBehavior',0,1381021954);
INSERT INTO `hkcms_behavior_rule` VALUES (3,3,1,'','','phpfile:ModuleInitBehavior',0,1381021954);
INSERT INTO `hkcms_behavior_rule` VALUES (4,14,1,'','','phpfile:AppDispatchBehavior',0,1381021954);
INSERT INTO `hkcms_behavior_rule` VALUES (5,15,0,'','message','addon:message',0,1566899957);

-- ----------------------------
-- Table structure for hkcms_cache
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_cache`;
CREATE TABLE `hkcms_cache` (
  `id` int(10) NOT NULL AUTO_INCREMENT COMMENT '自增长ID',
  `key` char(100) NOT NULL DEFAULT '' COMMENT '缓存key值',
  `name` char(100) NOT NULL DEFAULT '' COMMENT '名称',
  `module` char(20) NOT NULL DEFAULT '' COMMENT '模块名称',
  `model` char(30) NOT NULL DEFAULT '' COMMENT '模型名称',
  `action` char(30) NOT NULL DEFAULT '' COMMENT '方法名',
  `param` char(255) NOT NULL DEFAULT '' COMMENT '参数',
  `system` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否系统',
  PRIMARY KEY (`id`),
  KEY `ckey` (`key`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='缓存更新列队';

-- ----------------------------
-- Records of hkcms_cache
-- ----------------------------
INSERT INTO `hkcms_cache` VALUES ('1', 'Config', '网站配置', '', 'Config', 'config_cache', '', '1');
INSERT INTO `hkcms_cache` VALUES ('2', 'Module', '可用模块列表', '', 'Module', 'module_cache', '', '1');
INSERT INTO `hkcms_cache` VALUES ('3', 'Behavior', '行为列表', '', 'Behavior', 'behavior_cache', '', '1');
INSERT INTO `hkcms_cache` VALUES ('4', 'Menu', '后台菜单', 'Admin', 'Menu', 'menu_cache', '', '0');
INSERT INTO `hkcms_cache` VALUES ('5', 'Category', '栏目索引', 'Content', 'Category', 'category_cache', '', '0');
INSERT INTO `hkcms_cache` VALUES ('6', 'Model', '模型列表', 'Content', 'Model', 'model_cache', '', '0');
INSERT INTO `hkcms_cache` VALUES ('7', 'Urlrules', 'URL规则', 'Content', 'Urlrule', 'urlrule_cache', '', '0');
INSERT INTO `hkcms_cache` VALUES ('8', 'ModelField', '模型字段', 'Content', 'ModelField', 'model_field_cache', '', '0');
INSERT INTO `hkcms_cache` VALUES ('9', 'Position', '推荐位', 'Content', 'Position', 'position_cache', '', '0');
INSERT INTO `hkcms_cache` VALUES ('10', 'Addons', '插件列表', 'Addons', 'Addons', 'addons_cache', '', '0');

-- ----------------------------
-- Table structure for hkcms_addons
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_addons`;
CREATE TABLE `hkcms_addons` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT '主键',
  `name` varchar(40) NOT NULL COMMENT '插件名或标识，区分大小写',
  `sign` varchar(255) NOT NULL COMMENT '签名',
  `title` varchar(20) NOT NULL COMMENT '中文名',
  `description` text COMMENT '插件描述',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态 1-启用 0-禁用 -1-损坏',
  `config` text COMMENT '配置 序列化存放',
  `author` varchar(40) DEFAULT NULL COMMENT '作者',
  `version` varchar(20) DEFAULT NULL COMMENT '版本号',
  `create_time` int(10) unsigned NOT NULL COMMENT '安装时间',
  `has_adminlist` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1-有后台列表 0-无后台列表',
  `behavior` text COMMENT '插件行为列表',
  PRIMARY KEY (`id`),
  KEY `sign` (`sign`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='插件表';

INSERT INTO `hkcms_addons` VALUES (1,'message','e10adc3949ba59abbe56e057f20f883e','留言板插件','留言板插件，安装时会自动创建hkcms(前缀)_message表，卸载也会删除表。',1,'N;','holuo','1.0.0',1566899957,1,'view_nav_menu');

-- ----------------------------
-- Table structure for hkcms_category
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_category`;
CREATE TABLE `hkcms_category` (
  `catid` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '栏目ID',
  `module` varchar(15) NOT NULL DEFAULT '' COMMENT '所属模块',
  `type` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '类别',
  `modelid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  `domain` varchar(200) NOT NULL DEFAULT '' COMMENT '栏目绑定域名',
  `parentid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '父ID',
  `arrparentid` varchar(255) NOT NULL DEFAULT '' COMMENT '所有父ID',
  `child` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否存在子栏目，1存在',
  `arrchildid` mediumtext COMMENT '所有子栏目ID',
  `catname` varchar(30) NOT NULL DEFAULT '' COMMENT '栏目名称',
  `image` varchar(100) NOT NULL DEFAULT '' COMMENT '栏目图片',
  `description` mediumtext COMMENT '栏目描述',
  `parentdir` varchar(100) NOT NULL DEFAULT '' COMMENT '父目录',
  `catdir` varchar(30) NOT NULL DEFAULT '' COMMENT '栏目目录',
  `url` varchar(100) NOT NULL DEFAULT '' COMMENT '链接地址',
  `hits` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '栏目点击数',
  `setting` mediumtext COMMENT '相关配置信息',
  `listorder` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  `ismenu` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否显示',
  `sethtml` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否生成静态',
  `letter` varchar(30) NOT NULL DEFAULT '' COMMENT '栏目拼音',
  PRIMARY KEY (`catid`),
  KEY `module` (`module`,`parentid`,`listorder`,`catid`),
  KEY `siteid` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='栏目表';

-- ----------------------------
-- Records of hkcms_category
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_category_field
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_category_field`;
CREATE TABLE `hkcms_category_field` (
  `fid` smallint(6) NOT NULL AUTO_INCREMENT COMMENT '自增长id',
  `catid` smallint(5) NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `fieldname` varchar(30) NOT NULL DEFAULT '' COMMENT '字段名',
  `type` varchar(10) NOT NULL DEFAULT '' COMMENT '类型,input',
  `setting` mediumtext COMMENT '其他',
  `createtime` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`fid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='栏目扩展字段列表';

-- ----------------------------
-- Records of hkcms_category_field
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_category_priv
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_category_priv`;
CREATE TABLE `hkcms_category_priv` (
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `roleid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '角色或者组ID',
  `is_admin` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否为管理员 1、管理员',
  `action` char(30) NOT NULL DEFAULT '' COMMENT '动作',
  KEY `catid` (`catid`,`roleid`,`is_admin`,`action`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='栏目权限表';

-- ----------------------------
-- Records of hkcms_category_priv
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_config
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_config`;
CREATE TABLE `hkcms_config` (
  `id` smallint(8) unsigned NOT NULL AUTO_INCREMENT,
  `varname` varchar(20) NOT NULL DEFAULT '',
  `info` varchar(100) NOT NULL DEFAULT '',
  `groupid` tinyint(3) unsigned NOT NULL DEFAULT '1',
  `value` text,
  PRIMARY KEY (`id`),
  KEY `varname` (`varname`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='网站配置表';

-- ----------------------------
-- Records of hkcms_config
-- ----------------------------
INSERT INTO `hkcms_config` VALUES ('1', 'sitename', '网站名称', '1', 'HkCms内容管理系统 - 一款基于PHP的轻量级免费开源CMS建站系统|LvyeCMS内容管理系统');
INSERT INTO `hkcms_config` VALUES ('2', 'siteurl', '网站网址', '1', '/');
INSERT INTO `hkcms_config` VALUES ('3', 'sitefileurl', '附件地址', '1', '/d/file/');
INSERT INTO `hkcms_config` VALUES ('4', 'siteemail', '站点邮箱', '1', 'ad@qq.com');
INSERT INTO `hkcms_config` VALUES ('6', 'siteinfo', '网站介绍', '1', 'HkCms开源内容管理系统,是一款完全开源免费的PHP+MYSQL系统.核心采用了Thinkphp5.0框架等众多开源软件,同时核心功能也作为开源软件发布');
INSERT INTO `hkcms_config` VALUES ('7', 'sitekeywords', '网站关键字', '1', 'HkCms开源内容管理系统');
INSERT INTO `hkcms_config` VALUES ('8', 'uploadmaxsize', '允许上传附件大小', '1', '20240');
INSERT INTO `hkcms_config` VALUES ('9', 'uploadallowext', '允许上传附件类型', '1', 'jpg|jpeg|gif|bmp|png|doc|docx|xls|xlsx|ppt|pptx|pdf|txt|rar|zip|swf');
INSERT INTO `hkcms_config` VALUES ('10', 'qtuploadmaxsize', '前台允许上传附件大小', '1', '200');
INSERT INTO `hkcms_config` VALUES ('11', 'qtuploadallowext', '前台允许上传附件类型', '1', 'jpg|jpeg|gif');
INSERT INTO `hkcms_config` VALUES ('12', 'watermarkenable', '是否开启图片水印', '1', '1');
INSERT INTO `hkcms_config` VALUES ('13', 'watermarkminwidth', '水印-宽', '1', '300');
INSERT INTO `hkcms_config` VALUES ('14', 'watermarkminheight', '水印-高', '1', '100');
INSERT INTO `hkcms_config` VALUES ('15', 'watermarkimg', '水印图片', '1', '/statics/images/mark_bai.png');
INSERT INTO `hkcms_config` VALUES ('16', 'watermarkpct', '水印透明度', '1', '80');
INSERT INTO `hkcms_config` VALUES ('17', 'watermarkquality', 'JPEG 水印质量', '1', '85');
INSERT INTO `hkcms_config` VALUES ('18', 'watermarkpos', '水印位置', '1', '7');
INSERT INTO `hkcms_config` VALUES ('19', 'theme', '主题风格', '1', 'default');
INSERT INTO `hkcms_config` VALUES ('20', 'ftpstatus', 'FTP上传', '1', '0');
INSERT INTO `hkcms_config` VALUES ('21', 'ftpuser', 'FTP用户名', '1', '');
INSERT INTO `hkcms_config` VALUES ('22', 'ftppassword', 'FTP密码', '1', '');
INSERT INTO `hkcms_config` VALUES ('23', 'ftphost', 'FTP服务器地址', '1', '');
INSERT INTO `hkcms_config` VALUES ('24', 'ftpport', 'FTP服务器端口', '1', '21');
INSERT INTO `hkcms_config` VALUES ('25', 'ftppasv', 'FTP是否开启被动模式', '1', '1');
INSERT INTO `hkcms_config` VALUES ('26', 'ftpssl', 'FTP是否使用SSL连接', '1', '0');
INSERT INTO `hkcms_config` VALUES ('27', 'ftptimeout', 'FTP超时时间', '1', '10');
INSERT INTO `hkcms_config` VALUES ('28', 'ftpuppat', 'FTP上传目录', '1', '/');
INSERT INTO `hkcms_config` VALUES ('29', 'mail_type', '邮件发送模式', '1', '1');
INSERT INTO `hkcms_config` VALUES ('30', 'mail_server', '邮件服务器', '1', 'smtp.qq.com');
INSERT INTO `hkcms_config` VALUES ('31', 'mail_port', '邮件发送端口', '1', '25');
INSERT INTO `hkcms_config` VALUES ('32', 'mail_from', '发件人地址', '1', 'admin@hkcms.cn');
INSERT INTO `hkcms_config` VALUES ('33', 'mail_auth', '密码验证', '1', '1');
INSERT INTO `hkcms_config` VALUES ('34', 'mail_user', '邮箱用户名', '1', '');
INSERT INTO `hkcms_config` VALUES ('35', 'mail_password', '邮箱密码', '1', '');
INSERT INTO `hkcms_config` VALUES ('36', 'mail_fname', '发件人名称', '1', 'HkCms管理员');
INSERT INTO `hkcms_config` VALUES ('37', 'domainaccess', '指定域名访问', '1', '0');
INSERT INTO `hkcms_config` VALUES ('38', 'generate', '是否生成首页', '1', '1');
INSERT INTO `hkcms_config` VALUES ('39', 'index_urlruleid', '首页URL规则', '1', '11');
INSERT INTO `hkcms_config` VALUES ('40', 'indextp', '首页模板', '1', 'index.php');
INSERT INTO `hkcms_config` VALUES ('41', 'tagurl', 'TagURL规则', '1', '8');
INSERT INTO `hkcms_config` VALUES ('42', 'checkcode_type', '验证码类型', '1', '0');
INSERT INTO `hkcms_config` VALUES ('43', 'attachment_driver', '附件驱动', '1', 'Local');
INSERT INTO `hkcms_config` VALUES ('44', 'addonsite', '应用中心', '1', 'http://addon.hkcms.cn');
INSERT INTO `hkcms_config` VALUES (45, 'html_path', '静态化文件夹地址', 1, 'html/');

-- ----------------------------
-- Table structure for hkcms_config_field
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_config_field`;
CREATE TABLE `hkcms_config_field` (
  `fid` smallint(6) NOT NULL AUTO_INCREMENT COMMENT '自增长id',
  `fieldname` varchar(30) NOT NULL DEFAULT '' COMMENT '字段名',
  `type` varchar(10) NOT NULL DEFAULT '' COMMENT '类型,input',
  `setting` mediumtext COMMENT '其他',
  `createtime` int(10) NOT NULL DEFAULT '0' COMMENT '创建时间',
  PRIMARY KEY (`fid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='网站配置，扩展字段列表';

-- ----------------------------
-- Records of hkcms_config_field
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_customlist
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_customlist`;
CREATE TABLE `hkcms_customlist` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '自定义列表ID',
  `url` char(100) NOT NULL DEFAULT '' COMMENT '访问地址',
  `name` varchar(60) NOT NULL DEFAULT '' COMMENT '列表标题',
  `title` varchar(120) NOT NULL DEFAULT '' COMMENT '网页标题',
  `keywords` varchar(40) NOT NULL DEFAULT '' COMMENT '网页关键字',
  `description` text COMMENT '页面简介',
  `totalsql` text COMMENT '数据统计SQL',
  `listsql` text COMMENT '数据查询SQL',
  `lencord` int(11) NOT NULL DEFAULT '0' COMMENT '每页显示',
  `urlruleid` int(11) NOT NULL DEFAULT '0' COMMENT 'URL规则ID',
  `urlrule` varchar(120) NOT NULL DEFAULT '' COMMENT 'URL规则',
  `template` mediumtext COMMENT '模板',
  `listpath` varchar(60) NOT NULL DEFAULT '' COMMENT '列表模板文件',
  `createtime` int(10) NOT NULL DEFAULT '0' COMMENT '添加时间',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='自定义列表';

-- ----------------------------
-- Records of hkcms_customlist
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_customtemp
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_customtemp`;
CREATE TABLE `hkcms_customtemp` (
  `tempid` smallint(6) NOT NULL AUTO_INCREMENT COMMENT '模板ID',
  `name` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '' COMMENT '模板名称',
  `tempname` varchar(30) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '模板完整文件名',
  `temppath` varchar(200) CHARACTER SET utf8 NOT NULL DEFAULT '' COMMENT '模板生成路径',
  `temptext` mediumtext CHARACTER SET utf8 COMMENT '模板内容',
  PRIMARY KEY (`tempid`),
  KEY `tempname` (`tempname`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='自定义模板表';

-- ----------------------------
-- Records of hkcms_customtemp
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_locking
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_locking`;
CREATE TABLE `hkcms_locking` (
  `userid` int(11) NOT NULL COMMENT '用户ID',
  `username` varchar(30) NOT NULL DEFAULT '' COMMENT '用户名',
  `catid` smallint(5) NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `id` mediumint(8) NOT NULL DEFAULT '0' COMMENT '信息ID',
  `locktime` int(10) NOT NULL DEFAULT '0' COMMENT '锁定时间',
  KEY `userid` (`userid`),
  KEY `onlinetime` (`locktime`)
) ENGINE=MEMORY DEFAULT CHARSET=utf8 COMMENT='信息锁定';

-- ----------------------------
-- Records of hkcms_locking
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_loginlog
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_loginlog`;
CREATE TABLE `hkcms_loginlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '日志ID',
  `username` char(30) NOT NULL DEFAULT '' COMMENT '登录帐号',
  `logintime` int(10) NOT NULL DEFAULT '0' COMMENT '登录时间戳',
  `loginip` char(20) NOT NULL DEFAULT '' COMMENT '登录IP',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态,1为登录成功，0为登录失败',
  `password` varchar(30) NOT NULL DEFAULT '' COMMENT '尝试错误密码',
  `info` varchar(255) NOT NULL DEFAULT '' COMMENT '其他说明',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='后台登陆日志表';

-- ----------------------------
-- Records of hkcms_loginlog
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_menu
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_menu`;
CREATE TABLE `hkcms_menu` (
  `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL DEFAULT '' COMMENT '菜单名称',
  `parentid` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '上级菜单',
  `app` char(20) NOT NULL DEFAULT '' COMMENT '应用标识',
  `controller` char(20) NOT NULL DEFAULT '' COMMENT '控制键',
  `action` char(20) NOT NULL DEFAULT '' COMMENT '方法',
  `parameter` char(255) NOT NULL DEFAULT '' COMMENT '附加参数',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '类型',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否禁用',
  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
  `listorder` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '排序ID',
  PRIMARY KEY (`id`),
  KEY `parentid` (`parentid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='后台菜单表';

-- ----------------------------
-- Records of hkcms_menu
-- ----------------------------
INSERT INTO `hkcms_menu` VALUES (1,'缓存更新',0,'Admin','Index','cache','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (2,'我的面板',0,'Admin','Config','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (3,'设置',0,'Admin','Config','index','',0,1,'',1);
INSERT INTO `hkcms_menu` VALUES (4,'个人信息',2,'Admin','Adminmanage','myinfo','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (5,'修改个人信息',4,'Admin','Adminmanage','myinfo','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (6,'修改密码',4,'Admin','Adminmanage','chanpass','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (7,'系统设置',3,'Admin','Config','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (8,'站点配置',7,'Admin','Config','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (9,'邮箱配置',8,'Admin','Config','mail','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (10,'附件配置',8,'Admin','Config','attach','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (11,'高级配置',8,'Admin','Config','addition','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (12,'扩展配置',8,'Admin','Config','extend','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (13,'行为管理',7,'Admin','Behavior','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (14,'行为日志',13,'Admin','Behavior','logs','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (15,'编辑行为',13,'Admin','Behavior','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (16,'删除行为',13,'Admin','Behavior','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (17,'后台菜单管理',7,'Admin','Menu','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (18,'添加菜单',17,'Admin','Menu','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (19,'修改',17,'Admin','Menu','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (20,'删除',17,'Admin','Menu','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (21,'管理员设置',3,'Admin','Management','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (22,'管理员管理',21,'Admin','Management','manager','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (23,'添加管理员',22,'Admin','Management','adminadd','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (24,'编辑管理信息',22,'Admin','Management','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (25,'删除管理员',22,'Admin','Management','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (26,'角色管理',21,'Admin','Rbac','rolemanage','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (27,'添加角色',26,'Admin','Rbac','roleadd','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (28,'删除角色',26,'Admin','Rbac','roledelete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (29,'角色编辑',26,'Admin','Rbac','roleedit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (30,'角色授权',26,'Admin','Rbac','authorize','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (31,'日志管理',3,'Admin','Logs','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (32,'后台登陆日志',31,'Admin','Logs','loginlog','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (33,'后台操作日志',31,'Admin','Logs','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (34,'删除一个月前的登陆日志',32,'Admin','Logs','deleteloginlog','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (35,'删除一个月前的操作日志',33,'Admin','Logs','deletelog','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (36,'添加行为',13,'Admin','Behavior','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (37,'模块',0,'Admin','Module','index','',0,1,'',3);
INSERT INTO `hkcms_menu` VALUES (39,'模块',114,'Admin','Moduleshop','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (40,'插件',114,'Admin','Addonshop','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (113,'模板',114,'Admin','Templateshop','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (41,'在线升级',113,'Admin','Upgrade','index','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (42,'本地模块管理',37,'Admin','Module','local','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (43,'模块管理',42,'Admin','Module','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (44,'内容',0,'Content','Index','index','',0,1,'',2);
INSERT INTO `hkcms_menu` VALUES (45,'内容管理',44,'Content','Content','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (46,'内容相关设置',44,'Content','Category','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (47,'栏目列表',46,'Content','Category','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (48,'添加栏目',47,'Content','Category','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (49,'添加单页',47,'Content','Category','singlepage','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (50,'添加外部链接栏目',47,'Content','Category','wadd','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (51,'编辑栏目',47,'Content','Category','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (52,'删除栏目',47,'Content','Category','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (53,'栏目属性转换',47,'Content','Category','categoryshux','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (54,'模型管理',46,'Content','Models','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (55,'创建新模型',54,'Content','Models','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (56,'删除模型',54,'Content','Models','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (57,'编辑模型',54,'Content','Models','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (58,'模型禁用',54,'Content','Models','disabled','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (59,'模型导入',54,'Content','Models','import','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (60,'字段管理',54,'Content','Field','index','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (61,'字段修改',60,'Content','Field','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (62,'字段删除',60,'Content','Field','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (63,'字段状态',60,'Content','Field','disabled','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (64,'模型预览',60,'Content','Field','priview','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (65,'管理内容',45,'Content','Content','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (66,'附件管理',45,'Attachment','Atadmin','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (67,'删除',66,'Attachment','Atadmin','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (68,'发布管理',44,'Content','Createhtml','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (69,'批量更新栏目页',68,'Content','Createhtml','category','',1,1,'',2);
INSERT INTO `hkcms_menu` VALUES (70,'生成首页',68,'Content','Createhtml','index','',1,1,'',4);
INSERT INTO `hkcms_menu` VALUES (71,'批量更新URL',68,'Content','Createhtml','update_urls','',1,1,'',1);
INSERT INTO `hkcms_menu` VALUES (72,'批量更新内容页',68,'Content','Createhtml','update_show','',1,1,'',3);
INSERT INTO `hkcms_menu` VALUES (73,'刷新自定义页面',68,'Template','Custompage','createhtml','',1,1,'',5);
INSERT INTO `hkcms_menu` VALUES (74,'URL规则管理',46,'Content','Urlrule','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (75,'添加规则',74,'Content','Urlrule','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (76,'编辑',74,'Content','Urlrule','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (77,'删除',74,'Content','Urlrule','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (78,'推荐位管理',46,'Content','Position','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (79,'信息管理',78,'Content','Position','item','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (80,'添加推荐位',78,'Content','Position','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (81,'修改推荐位',78,'Content','Position','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (82,'删除推荐位',78,'Content','Position','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (83,'信息编辑',79,'Content','Position','item_manage','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (84,'信息排序',79,'Content','Position','item_listorder','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (85,'数据重建',78,'Content','Position','rebuilding','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (86,'Tags管理',45,'Content','Tags','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (87,'修改',86,'Content','Tags','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (88,'删除',86,'Content','Tags','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (89,'Tags数据重建',86,'Content','Tags','create','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (90,'界面',0,'Template','Style','index','',0,1,'',5);
INSERT INTO `hkcms_menu` VALUES (91,'模板管理',90,'Template','Style','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (92,'模板风格',91,'Template','Style','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (93,'添加模板页',92,'Template','Style','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (94,'删除模板',92,'Template','Style','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (95,'修改模板',92,'Template','Style','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (96,'主题管理',91,'Template','Theme','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (97,'主题更换',96,'Template','Theme','chose','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (98,'自定义页面',90,'Template','Custompage','index','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (99,'自定义页面',98,'Template','Custompage','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (100,'添加自定义页面',99,'Template','Custompage','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (101,'删除自定义页面',99,'Template','Custompage','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (102,'编辑自定义页面',99,'Template','Custompage','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (103,'自定义列表',98,'Template','Customlist','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (104,'添加列表',103,'Template','Customlist','add','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (105,'删除列表',103,'Template','Customlist','delete','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (106,'编辑列表',103,'Template','Customlist','edit','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (107,'生成列表',103,'Template','Customlist','generate','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (108,'安装模块',39,'Admin','Moduleshop','install','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (109,'升级模块',39,'Admin','Moduleshop','upgrade','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (110,'安装插件',40,'Admin','Addonshop','install','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (111,'升级插件',40,'Admin','Addonshop','upgrade','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (112,'栏目授权',26,'Admin','Rbac','setting_cat_priv','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (114,'应用中心',0,'admin','Moduleshop','index','',1,1,'',10);
INSERT INTO `hkcms_menu` VALUES (115,'插件',0,'Addons','Addons','index','',1,1,'插件扩展管理！',4);
INSERT INTO `hkcms_menu` VALUES (116,'插件管理',115,'Addons','Addons','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (117,'插件后台列表',115,'Addons','Addons','addonadmin','',0,1,'',0);
INSERT INTO `hkcms_menu` VALUES (118,'插件管理',116,'Addons','Addons','index','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (119,'创建新插件',118,'Addons','Addons','create','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (120,'本地安装',118,'Addons','Addons','local','',1,1,'',0);
INSERT INTO `hkcms_menu` VALUES (121,'插件打包',118,'Addons','Addons','unpack','',1,0,'',0);
INSERT INTO `hkcms_menu` VALUES (122,'留言板插件',117,'Addons','message','index','isadmin=1',1,1,'留言板插件插件管理后台！',0);

-- ----------------------------
-- Table structure for hkcms_model
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_model`;
CREATE TABLE `hkcms_model` (
  `modelid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` char(30) NOT NULL DEFAULT '' COMMENT '模型名称',
  `description` char(100) NOT NULL DEFAULT '' COMMENT '描述',
  `tablename` char(20) NOT NULL DEFAULT '' COMMENT '表名',
  `setting` text COMMENT '配置信息',
  `addtime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '添加时间',
  `items` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '信息数',
  `enablesearch` tinyint(1) unsigned NOT NULL DEFAULT '1' COMMENT '是否开启全站搜索',
  `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否禁用 1禁用',
  `default_style` char(30) NOT NULL DEFAULT '' COMMENT '风格',
  `category_template` char(30) NOT NULL DEFAULT '' COMMENT '栏目模板',
  `list_template` char(30) NOT NULL DEFAULT '' COMMENT '列表模板',
  `show_template` char(30) NOT NULL DEFAULT '' COMMENT '内容模板',
  `js_template` varchar(30) NOT NULL DEFAULT '' COMMENT 'JS模板',
  `sort` tinyint(3) NOT NULL DEFAULT '0' COMMENT '排序',
  `type` tinyint(1) NOT NULL DEFAULT '0' COMMENT '模块标识',
  PRIMARY KEY (`modelid`),
  KEY `type` (`type`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='内容模型列表';

-- ----------------------------
--  Records of `hkcms_model`
-- ----------------------------
BEGIN;
INSERT INTO `hkcms_model` VALUES ('1', '文章模型', '文章模型', 'article', '', '1403150253', '0', '1', '0', '', '', '', '', '', '0', '0'), ('2', '下载模型', '下载模型', 'download', '', '1403153866', '0', '1', '0', '', '', '', '', '', '0', '0'), ('3', '图片模型', '图片模型', 'photo', '', '1403153881', '0', '1', '0', '', '', '', '', '', '0', '0');
COMMIT;

-- ----------------------------
-- Table structure for hkcms_model_field
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_model_field`;
CREATE TABLE `hkcms_model_field` (
  `fieldid` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `modelid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  `field` varchar(20) NOT NULL DEFAULT '' COMMENT '字段名',
  `name` varchar(30) NOT NULL DEFAULT '' COMMENT '别名',
  `tips` text COMMENT '字段提示',
  `css` varchar(30) NOT NULL DEFAULT '' COMMENT '表单样式',
  `minlength` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最小值',
  `maxlength` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最大值',
  `pattern` varchar(255) NOT NULL DEFAULT '' COMMENT '数据校验正则',
  `errortips` varchar(255) NOT NULL DEFAULT '' COMMENT '数据校验未通过的提示信息',
  `formtype` varchar(20) NOT NULL DEFAULT '' COMMENT '字段类型',
  `setting` mediumtext,
  `formattribute` varchar(255) NOT NULL DEFAULT '',
  `unsetgroupids` varchar(255) NOT NULL DEFAULT '',
  `unsetroleids` varchar(255) NOT NULL DEFAULT '',
  `iscore` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否内部字段 1是',
  `issystem` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否系统字段 1 是',
  `isunique` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '值唯一',
  `isbase` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '作为基本信息',
  `issearch` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '作为搜索条件',
  `isadd` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '在前台投稿中显示',
  `isfulltext` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '作为全站搜索信息',
  `isposition` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否入库到推荐位',
  `listorder` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '1 禁用 0启用',
  `isomnipotent` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`fieldid`),
  KEY `modelid` (`modelid`,`disabled`),
  KEY `field` (`field`,`modelid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='模型字段列表';

-- ----------------------------
--  Records of `hkcms_model_field`
-- ----------------------------
BEGIN;
INSERT INTO `hkcms_model_field` VALUES (1, 1, 'status', '状态', '', '', 0, 2, '', '', 'box', 'a:8:{s:7:\"options\";s:0:\"\";s:9:\"fieldtype\";s:7:\"varchar\";s:5:\"width\";s:0:\"\";s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"outputtype\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 15, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (2, 1, 'username', '用户名', '', '', 0, 20, '', '', 'text', 'a:5:{s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"ispassword\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 16, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (3, 1, 'islink', '转向链接', '', '', 0, 0, '', '', 'islink', 'a:3:{s:4:\"size\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 0, 0, 1, 0, 0, 17, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (4, 1, 'template', '内容页模板', '', '', 0, 30, '', '', 'template', 'a:2:{s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '-99', '-99', 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (5, 1, 'allow_comment', '允许评论', '', '', 0, 0, '', '', 'box', 'a:10:{s:7:\"options\";s:32:\"允许评论|1\n不允许评论|0\";s:7:\"boxtype\";s:5:\"radio\";s:9:\"fieldtype\";s:7:\"tinyint\";s:9:\"minnumber\";s:1:\"1\";s:5:\"width\";s:2:\"88\";s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:1:\"1\";s:10:\"outputtype\";s:1:\"1\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (6, 1, 'pages', '分页方式', '', '', 0, 0, '', '', 'pages', 'a:2:{s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '-99', '-99', 0, 0, 0, 1, 0, 0, 0, 0, 9, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (7, 1, 'inputtime', '真实发布时间', '', '', 0, 0, '', '', 'datetime', 'a:5:{s:9:\"fieldtype\";s:3:\"int\";s:6:\"format\";s:11:\"Y-m-d H:i:s\";s:11:\"defaulttype\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 1, 1, 0, 0, 0, 0, 0, 1, 11, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (8, 1, 'posid', '推荐位', '', '', 0, 0, '', '', 'posid', 'a:4:{s:5:\"width\";s:3:\"125\";s:12:\"defaultvalue\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 1, 0, 0, 0, 1, 11, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (9, 1, 'url', 'URL', '', '', 0, 100, '', '', 'text', 'a:5:{s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"ispassword\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 1, 1, 0, 1, 0, 0, 0, 1, 12, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (10, 1, 'listorder', '排序', '', '', 0, 6, '', '', 'number', 'a:7:{s:9:\"minnumber\";s:0:\"\";s:9:\"maxnumber\";s:0:\"\";s:13:\"decimaldigits\";s:1:\"0\";s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 18, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (11, 1, 'relation', '相关文章', '', '', 0, 255, '', '', 'omnipotent', 'a:4:{s:8:\"formtext\";s:464:\"<input type=\"hidden\" name=\"info[relation]\" id=\"relation\" value=\"{FIELD_VALUE}\" style=\"50\" >\n<ul class=\"list-dot\" id=\"relation_text\">\n</ul>\n<input type=\"button\" value=\"添加相关\" onClick=\"omnipotent(\'selectid\',GV.DIMAUB+\'index.php?m=content&c=content&a=public_relationlist&modelid={MODELID}\',\'添加相关文章\',1)\" class=\"btn\">\n<span class=\"edit_content\">\n  <input type=\"button\" value=\"显示已有\" onClick=\"show_relation({MODELID},{ID})\" class=\"btn\">\n</span>\";s:9:\"fieldtype\";s:7:\"varchar\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 0, 0, 0, 0, 0, 1, 0, 8, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (12, 1, 'thumb', '缩略图', '', '', 0, 100, '', '', 'image', 'a:10:{s:5:\"width\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";s:9:\"show_type\";s:1:\"1\";s:15:\"upload_allowext\";s:20:\"jpg|jpeg|gif|png|bmp\";s:9:\"watermark\";s:1:\"0\";s:13:\"isselectimage\";s:1:\"1\";s:12:\"images_width\";s:0:\"\";s:13:\"images_height\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 0, 0, 1, 0, 1, 7, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (13, 1, 'catid', '栏目', '', '', 1, 6, '/^[0-9]{1,6}$/', '请选择栏目', 'catid', 'a:2:{s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (15, 1, 'title', '标题', '', 'inputtitle', 1, 80, '', '请输入标题', 'title', 'a:2:{s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 1, 1, 1, 1, 1, 3, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (16, 1, 'keywords', '关键词', '多关之间用空格或者“,”隔开', '', 0, 40, '', '', 'keyword', 'a:2:{s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 1, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (17, 1, 'tags', 'TAGS', '多关之间用空格或者“,”隔开', '', 0, 0, '', '', 'tags', 'a:4:{s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (18, 1, 'description', '摘要', '', '', 0, 255, '', '', 'textarea', 'a:7:{s:5:\"width\";s:2:\"99\";s:6:\"height\";s:2:\"46\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"enablehtml\";s:1:\"0\";s:9:\"fieldtype\";s:10:\"mediumtext\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 1, 0, 1, 1, 1, 5, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (19, 1, 'updatetime', '发布时间', '', '', 0, 0, '', '', 'datetime', 'a:5:{s:9:\"fieldtype\";s:3:\"int\";s:6:\"format\";s:11:\"Y-m-d H:i:s\";s:11:\"defaulttype\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 0, 0, 0, 0, 0, 10, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (20, 1, 'content', '内容', '<style type=\"text/css\">.content_attr{ border:1px solid #CCC; padding:5px 8px; background:#FFC; margin-top:6px}</style><div class=\"content_attr\"><label><input name=\"add_introduce\" type=\"checkbox\"  value=\"1\" checked>是否截取内容</label><input type=\"text\" name=\"introcude_length\" value=\"200\" size=\"3\">字符至内容摘要\n<label><input type=\'checkbox\' name=\'auto_thumb\' value=\"1\" checked>是否获取内容第</label><input type=\"text\" name=\"auto_thumb_no\" value=\"1\" size=\"2\" class=\"\">张图片作为标题图片\n</div>', '', 1, 999999, '', '内容不能为空', 'editor', 'a:7:{s:7:\"toolbar\";s:4:\"full\";s:12:\"defaultvalue\";s:0:\"\";s:15:\"enablesaveimage\";s:1:\"1\";s:6:\"height\";s:0:\"\";s:9:\"fieldtype\";s:10:\"mediumtext\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 0, 0, 1, 0, 1, 1, 0, 6, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (21, 1, 'copyfrom', '来源', '', '', 0, 0, '', '', 'copyfrom', 'a:4:{s:12:\"defaultvalue\";s:0:\"\";s:5:\"width\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 0, 0, 1, 0, 1, 0, 0, 5, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (26, 2, 'username', '用户名', '', '', 0, 20, '', '', 'text', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 16, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (27, 2, 'islink', '转向链接', '', '', 0, 0, '', '', 'islink', '', '', '', '', 0, 1, 0, 0, 0, 1, 0, 0, 17, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (28, 2, 'template', '内容页模板', '', '', 0, 30, '', '', 'template', 'a:2:{s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";}', '', '-99', '-99', 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (29, 2, 'allow_comment', '允许评论', '', '', 0, 0, '', '', 'box', 'a:9:{s:7:\"options\";s:33:\"允许评论|1\r\n不允许评论|0\";s:7:\"boxtype\";s:5:\"radio\";s:9:\"fieldtype\";s:7:\"tinyint\";s:9:\"minnumber\";s:1:\"1\";s:5:\"width\";s:2:\"88\";s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:1:\"1\";s:10:\"outputtype\";s:1:\"1\";s:10:\"filtertype\";s:1:\"0\";}', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (24, 1, 'prefix', '自定义文件名', '', '', 0, 255, '', '', 'text', 'a:5:{s:4:\"size\";s:3:\"180\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"ispassword\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (66, 3, 'prefix', '自定义文件名', '', '', 0, 0, '', '', 'text', 'a:7:{s:4:\"size\";s:2:\"50\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"ispassword\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 1, 0, 0, 0, 0, 0, 0, 8, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (25, 2, 'status', '状态', '', '', 0, 2, '', '', 'box', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 15, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (65, 2, 'prefix', '自定义文件名', '', '', 0, 0, '', '', 'text', 'a:7:{s:4:\"size\";s:3:\"180\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"ispassword\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 1, 0, 0, 0, 0, 0, 0, 17, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (31, 2, 'inputtime', '真实发布时间', '', '', 0, 0, '', '', 'datetime', 'a:3:{s:9:\"fieldtype\";s:3:\"int\";s:6:\"format\";s:11:\"Y-m-d H:i:s\";s:11:\"defaulttype\";s:1:\"0\";}', '', '', '', 1, 1, 0, 0, 0, 0, 0, 1, 11, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (32, 2, 'posid', '推荐位', '', '', 0, 0, '', '', 'posid', 'a:4:{s:5:\"width\";s:3:\"125\";s:12:\"defaultvalue\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 1, 0, 0, 0, 1, 11, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (33, 2, 'url', 'URL', '', '', 0, 100, '', '', 'text', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 1, 12, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (34, 2, 'listorder', '排序', '', '', 0, 6, '', '', 'number', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 18, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (35, 2, 'relation', '相关下载', '', '', 0, 255, '', '', 'omnipotent', 'a:4:{s:8:\"formtext\";s:464:\"<input type=\"hidden\" name=\"info[relation]\" id=\"relation\" value=\"{FIELD_VALUE}\" style=\"50\" >\n<ul class=\"list-dot\" id=\"relation_text\">\n</ul>\n<input type=\"button\" value=\"添加相关\" onClick=\"omnipotent(\'selectid\',GV.DIMAUB+\'index.php?m=content&c=content&a=public_relationlist&modelid={MODELID}\',\'添加相关信息\',1)\" class=\"btn\">\n<span class=\"edit_content\">\n  <input type=\"button\" value=\"显示已有\" onClick=\"show_relation({MODELID},{ID})\" class=\"btn\">\n</span>\";s:9:\"fieldtype\";s:7:\"varchar\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 0, 0, 0, 0, 0, 1, 0, 8, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (36, 2, 'thumb', '缩略图', '', '', 0, 100, '', '', 'image', 'a:9:{s:4:\"size\";s:2:\"50\";s:12:\"defaultvalue\";s:0:\"\";s:9:\"show_type\";s:1:\"1\";s:14:\"upload_maxsize\";s:4:\"1024\";s:15:\"upload_allowext\";s:20:\"jpg|jpeg|gif|png|bmp\";s:9:\"watermark\";s:1:\"0\";s:13:\"isselectimage\";s:1:\"1\";s:12:\"images_width\";s:0:\"\";s:13:\"images_height\";s:0:\"\";}', '', '', '', 0, 1, 0, 0, 0, 1, 0, 1, 7, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (37, 2, 'catid', '栏目', '', '', 1, 6, '/^[0-9]{1,6}$/', '请选择栏目', 'catid', 'a:1:{s:12:\"defaultvalue\";s:0:\"\";}', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (38, 2, 'typeid', '类别', '', '', 0, 0, '', '', 'typeid', 'a:2:{s:9:\"minnumber\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";}', '', '', '', 1, 1, 0, 1, 1, 1, 0, 0, 2, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (39, 2, 'title', '标题', '', 'inputtitle', 1, 80, '', '请输入标题', 'title', '', '', '', '', 0, 1, 0, 1, 1, 1, 1, 1, 3, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (40, 2, 'keywords', '关键词', '多关键词之间用空格隔开', '', 0, 40, '', '', 'keyword', 'a:2:{s:4:\"size\";s:3:\"100\";s:12:\"defaultvalue\";s:0:\"\";}', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 1, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (41, 2, 'tags', 'TAGS', '多关之间用空格或者“,”隔开', '', 0, 0, '', '', 'tags', 'a:4:{s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (42, 2, 'description', '摘要', '', '', 0, 255, '', '', 'textarea', 'a:4:{s:5:\"width\";s:2:\"98\";s:6:\"height\";s:2:\"46\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"enablehtml\";s:1:\"0\";}', '', '', '', 0, 1, 0, 1, 0, 1, 1, 1, 5, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (43, 2, 'updatetime', '发布时间', '', '', 0, 0, '', '', 'datetime', 'a:3:{s:9:\"fieldtype\";s:3:\"int\";s:6:\"format\";s:11:\"Y-m-d H:i:s\";s:11:\"defaulttype\";s:1:\"0\";}', '', '', '', 0, 1, 0, 0, 0, 0, 0, 0, 10, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (45, 3, 'status', '状态', '', '', 0, 2, '', '', 'box', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 15, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (46, 3, 'username', '用户名', '', '', 0, 20, '', '', 'text', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 16, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (47, 3, 'islink', '转向链接', '', '', 0, 0, '', '', 'islink', '', '', '', '', 0, 1, 0, 0, 0, 1, 0, 0, 17, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (48, 3, 'template', '内容页模板', '', '', 0, 30, '', '', 'template', 'a:2:{s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:0:\"\";}', '', '-99', '-99', 0, 0, 0, 0, 0, 0, 0, 0, 13, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (49, 3, 'allow_comment', '允许评论', '', '', 0, 0, '', '', 'box', 'a:9:{s:7:\"options\";s:33:\"允许评论|1\r\n不允许评论|0\";s:7:\"boxtype\";s:5:\"radio\";s:9:\"fieldtype\";s:7:\"tinyint\";s:9:\"minnumber\";s:1:\"1\";s:5:\"width\";s:2:\"88\";s:4:\"size\";s:0:\"\";s:12:\"defaultvalue\";s:1:\"1\";s:10:\"outputtype\";s:1:\"1\";s:10:\"filtertype\";s:1:\"0\";}', '', '', '', 0, 0, 0, 0, 0, 0, 0, 0, 14, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (67, 2, 'download', '文件下载', '', '', 0, 0, '', '', 'downfiles', 'a:9:{s:15:\"upload_allowext\";s:20:\"gif|jpg|jpeg|png|bmp\";s:13:\"isselectimage\";s:1:\"0\";s:13:\"upload_number\";s:2:\"10\";s:10:\"statistics\";s:0:\"\";s:12:\"downloadlink\";s:1:\"1\";s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 0, 0, 1, 0, 1, 0, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (51, 3, 'inputtime', '真实发布时间', '', '', 0, 0, '', '', 'datetime', 'a:3:{s:9:\"fieldtype\";s:3:\"int\";s:6:\"format\";s:11:\"Y-m-d H:i:s\";s:11:\"defaulttype\";s:1:\"0\";}', '', '', '', 1, 1, 0, 0, 0, 0, 0, 1, 11, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (52, 3, 'posid', '推荐位', '', '', 0, 0, '', '', 'posid', 'a:4:{s:5:\"width\";s:3:\"125\";s:12:\"defaultvalue\";s:0:\"\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 1, 0, 1, 0, 0, 0, 1, 11, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (53, 3, 'url', 'URL', '', '', 0, 100, '', '', 'text', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 1, 12, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (54, 3, 'listorder', '排序', '', '', 0, 6, '', '', 'number', '', '', '', '', 1, 1, 0, 1, 0, 0, 0, 0, 18, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (55, 3, 'relation', '相关图片', '', '', 0, 255, '', '', 'omnipotent', 'a:4:{s:8:\"formtext\";s:464:\"<input type=\"hidden\" name=\"info[relation]\" id=\"relation\" value=\"{FIELD_VALUE}\" style=\"50\" >\n<ul class=\"list-dot\" id=\"relation_text\">\n</ul>\n<input type=\"button\" value=\"添加相关\" onClick=\"omnipotent(\'selectid\',GV.DIMAUB+\'index.php?m=content&c=content&a=public_relationlist&modelid={MODELID}\',\'添加相关信息\',1)\" class=\"btn\">\n<span class=\"edit_content\">\n  <input type=\"button\" value=\"显示已有\" onClick=\"show_relation({MODELID},{ID})\" class=\"btn\">\n</span>\";s:9:\"fieldtype\";s:7:\"varchar\";s:12:\"backstagefun\";s:0:\"\";s:8:\"frontfun\";s:0:\"\";}', '', '', '', 0, 0, 0, 0, 0, 0, 1, 0, 8, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (56, 3, 'thumb', '缩略图', '', '', 0, 100, '', '', 'image', 'a:9:{s:4:\"size\";s:2:\"50\";s:12:\"defaultvalue\";s:0:\"\";s:9:\"show_type\";s:1:\"1\";s:14:\"upload_maxsize\";s:4:\"1024\";s:15:\"upload_allowext\";s:20:\"jpg|jpeg|gif|png|bmp\";s:9:\"watermark\";s:1:\"0\";s:13:\"isselectimage\";s:1:\"1\";s:12:\"images_width\";s:0:\"\";s:13:\"images_height\";s:0:\"\";}', '', '', '', 0, 1, 0, 0, 0, 1, 0, 1, 7, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (57, 3, 'catid', '栏目', '', '', 1, 6, '/^[0-9]{1,6}$/', '请选择栏目', 'catid', 'a:1:{s:12:\"defaultvalue\";s:0:\"\";}', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 0, 0, 1, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (59, 3, 'title', '标题', '', 'inputtitle', 1, 80, '', '请输入标题', 'title', '', '', '', '', 0, 1, 0, 1, 1, 1, 1, 1, 3, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (60, 3, 'keywords', '关键词', '多关键词之间用空格隔开', '', 0, 40, '', '', 'keyword', 'a:2:{s:4:\"size\";s:3:\"100\";s:12:\"defaultvalue\";s:0:\"\";}', '', '-99', '-99', 0, 1, 0, 1, 1, 1, 1, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (61, 3, 'tags', 'TAGS', '多关之间用空格或者“,”隔开', '', 0, 0, '', '', 'tags', 'a:4:{s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 1, 0, 1, 0, 0, 0, 0, 4, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (62, 3, 'description', '摘要', '', '', 0, 255, '', '', 'textarea', 'a:4:{s:5:\"width\";s:2:\"98\";s:6:\"height\";s:2:\"46\";s:12:\"defaultvalue\";s:0:\"\";s:10:\"enablehtml\";s:1:\"0\";}', '', '', '', 0, 1, 0, 1, 0, 1, 1, 1, 5, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (63, 3, 'updatetime', '发布时间', '', '', 0, 0, '', '', 'datetime', 'a:3:{s:9:\"fieldtype\";s:3:\"int\";s:6:\"format\";s:11:\"Y-m-d H:i:s\";s:11:\"defaulttype\";s:1:\"0\";}', '', '', '', 0, 1, 0, 0, 0, 0, 0, 0, 10, 0, 0);
INSERT INTO `hkcms_model_field` VALUES (68, 3, 'imgs', '图片列表', '', '', 0, 0, '', '', 'images', 'a:8:{s:15:\"upload_allowext\";s:20:\"gif|jpg|jpeg|png|bmp\";s:13:\"isselectimage\";s:1:\"0\";s:13:\"upload_number\";s:2:\"10\";s:9:\"watermark\";s:1:\"0\";s:12:\"backstagefun\";s:0:\"\";s:17:\"backstagefun_type\";s:1:\"1\";s:8:\"frontfun\";s:0:\"\";s:13:\"frontfun_type\";s:1:\"1\";}', '', '', '', 0, 0, 0, 1, 0, 1, 0, 0, 8, 0, 0);
COMMIT;

-- ----------------------------
-- Table structure for hkcms_module
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_module`;
CREATE TABLE `hkcms_module` (
  `module` varchar(15) NOT NULL COMMENT '模块',
  `modulename` varchar(20) NOT NULL DEFAULT '' COMMENT '模块名称',
  `sign` varchar(255) NOT NULL DEFAULT '' COMMENT '签名',
  `iscore` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '内置模块',
  `disabled` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '是否可用',
  `version` varchar(50) NOT NULL DEFAULT '' COMMENT '版本',
  `setting` mediumtext COMMENT '设置信息',
  `installtime` int(10) NOT NULL DEFAULT '0' COMMENT '安装时间',
  `updatetime` int(10) NOT NULL DEFAULT '0' COMMENT '更新时间',
  `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`module`),
  KEY `sign` (`sign`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='已安装模块列表';

-- ----------------------------
-- Records of hkcms_module
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_operationlog
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_operationlog`;
CREATE TABLE `hkcms_operationlog` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '日志ID',
  `uid` smallint(6) NOT NULL DEFAULT '0' COMMENT '操作帐号ID',
  `time` int(10) NOT NULL DEFAULT '0' COMMENT '操作时间',
  `ip` char(20) NOT NULL DEFAULT '' COMMENT 'IP',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态,0错误提示，1为正确提示',
  `info` text COMMENT '其他说明',
  `get` varchar(255) NOT NULL DEFAULT '' COMMENT 'get数据',
  PRIMARY KEY (`id`),
  KEY `status` (`status`),
  KEY `username` (`uid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='后台操作日志表';

-- ----------------------------
-- Records of hkcms_operationlog
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_page
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_page`;
CREATE TABLE `hkcms_page` (
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `title` varchar(160) NOT NULL DEFAULT '' COMMENT '标题',
  `style` varchar(24) NOT NULL DEFAULT '' COMMENT '样式',
  `keywords` varchar(40) NOT NULL DEFAULT '' COMMENT '关键字',
  `content` text COMMENT '内容',
  `template` varchar(30) NOT NULL DEFAULT '',
  `updatetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  PRIMARY KEY (`catid`),
  KEY `catid` (`catid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='单页内容表';

-- ----------------------------
-- Records of hkcms_page
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_position
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_position`;
CREATE TABLE `hkcms_position` (
  `posid` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '推荐位id',
  `modelid` char(30) NOT NULL DEFAULT '' COMMENT '模型id',
  `catid` varchar(255) NOT NULL DEFAULT '' COMMENT '栏目id',
  `name` char(30) NOT NULL DEFAULT '' COMMENT '推荐位名称',
  `maxnum` smallint(5) NOT NULL DEFAULT '20' COMMENT '最大存储数据量',
  `extention` char(100) NOT NULL DEFAULT '',
  `listorder` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`posid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='推荐位';

-- ----------------------------
-- Records of hkcms_position
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_position_data
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_position_data`;
CREATE TABLE `hkcms_position_data` (
  `id` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT 'ID',
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `posid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '推荐位ID',
  `module` char(20) NOT NULL DEFAULT '' COMMENT '模型',
  `modelid` smallint(6) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  `thumb` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否有缩略图',
  `data` mediumtext COMMENT '数据信息',
  `listorder` mediumint(8) NOT NULL DEFAULT '0' COMMENT '排序',
  `expiration` int(10) NOT NULL,
  `extention` char(30) NOT NULL DEFAULT '',
  `synedit` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否同步编辑',
  KEY `posid` (`posid`),
  KEY `listorder` (`listorder`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='推荐位数据表';

-- ----------------------------
-- Records of hkcms_position_data
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_role
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_role`;
CREATE TABLE `hkcms_role` (
  `id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(20) NOT NULL DEFAULT '' COMMENT '角色名称',
  `parentid` smallint(6) NOT NULL DEFAULT '0' COMMENT '父角色ID',
  `status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态',
  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `listorder` int(3) NOT NULL DEFAULT '0' COMMENT '排序字段',
  PRIMARY KEY (`id`),
  KEY `parentId` (`parentid`),
  KEY `status` (`status`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='角色信息列表';

-- ----------------------------
-- Records of hkcms_role
-- ----------------------------
INSERT INTO `hkcms_role` VALUES ('1', '超级管理员', '0', '1', '拥有网站最高管理员权限！', '1329633709', '1329633709', '0');
INSERT INTO `hkcms_role` VALUES ('2', '站点管理员', '1', '1', '站点管理员', '1329633722', '1399780945', '0');
INSERT INTO `hkcms_role` VALUES ('3', '发布人员', '2', '1', '发布人员', '1329633733', '1399798954', '0');

-- ----------------------------
-- Table structure for hkcms_tags
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_tags`;
CREATE TABLE `hkcms_tags` (
  `tagid` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT 'tagID',
  `tag` char(20) NOT NULL DEFAULT '' COMMENT 'tag名称',
  `seo_title` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo标题',
  `seo_keyword` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo关键字',
  `seo_description` varchar(255) NOT NULL DEFAULT '' COMMENT 'seo简介',
  `style` char(5) NOT NULL DEFAULT '' COMMENT '附加状态码',
  `usetimes` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '信息总数',
  `lastusetime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最后使用时间',
  `hits` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '点击数',
  `lasthittime` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '最近访问时间',
  `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '排序',
  PRIMARY KEY (`tagid`),
  UNIQUE KEY `tag` (`tag`),
  KEY `usetimes` (`usetimes`,`listorder`),
  KEY `hits` (`hits`,`listorder`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='tags主表';

-- ----------------------------
-- Records of hkcms_tags
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_tags_content
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_tags_content`;
CREATE TABLE `hkcms_tags_content` (
  `tag` char(20) NOT NULL COMMENT 'tag名称',
  `url` varchar(255) NOT NULL DEFAULT '' COMMENT '信息地址',
  `title` varchar(80) NOT NULL DEFAULT '' COMMENT '标题',
  `modelid` tinyint(3) unsigned NOT NULL DEFAULT '0' COMMENT '模型ID',
  `contentid` mediumint(8) unsigned NOT NULL DEFAULT '0' COMMENT '信息ID',
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0' COMMENT '栏目ID',
  `updatetime` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  KEY `modelid` (`modelid`,`contentid`),
  KEY `tag` (`tag`(10))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='tags数据表';

-- ----------------------------
-- Records of hkcms_tags_content
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_terms
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_terms`;
CREATE TABLE `hkcms_terms` (
  `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT COMMENT '分类ID',
  `parentid` smallint(5) NOT NULL DEFAULT '0' COMMENT '父ID',
  `name` varchar(200) NOT NULL DEFAULT '' COMMENT '分类名称',
  `module` varchar(200) NOT NULL DEFAULT '' COMMENT '所属模块',
  `setting` mediumtext COMMENT '相关配置信息',
  PRIMARY KEY (`id`),
  KEY `name` (`name`),
  KEY `module` (`module`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='分类表';

-- ----------------------------
-- Records of hkcms_terms
-- ----------------------------

-- ----------------------------
-- Table structure for hkcms_urlrule
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_urlrule`;
CREATE TABLE `hkcms_urlrule` (
  `urlruleid` smallint(5) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则id',
  `module` varchar(15) NOT NULL DEFAULT '' COMMENT '所属模块',
  `file` varchar(20) NOT NULL DEFAULT '' COMMENT '所属文件',
  `ishtml` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '生成静态规则 1 静态',
  `urlrule` varchar(255) NOT NULL DEFAULT '' COMMENT 'url规则',
  `example` varchar(255) NOT NULL DEFAULT '' COMMENT '示例',
  PRIMARY KEY (`urlruleid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='内容模型URL规则';

-- ----------------------------
-- Records of hkcms_urlrule
-- ----------------------------

insert  into `hkcms_urlrule` values (1,'content','category',0,'index.php?a=lists&catid={$catid}|index.php?a=lists&catid={$catid}&page={$page}','动态：index.php?a=lists&catid=1&page=1');
insert  into `hkcms_urlrule` values (2,'content','category',1,'{$categorydir}{$catdir}/index.html|{$categorydir}{$catdir}/index_{$page}.html','静态：news/china/1000.html');
insert  into `hkcms_urlrule` values (3,'content','show',1,'{$year}/{$catdir}_{$month}/{$id}.html|{$year}/{$catdir}_{$month}/{$id}_{$page}.html','静态：2010/catdir_07/1_2.html');
insert  into `hkcms_urlrule` values (4,'content','show',0,'index.php?a=shows&catid={$catid}&id={$id}|index.php?a=shows&catid={$catid}&id={$id}&page={$page}','动态：index.php?a=shows&catid=1&id=1');
insert  into `hkcms_urlrule` values (5,'content','category',1,'news/{$catid}.html|news/{$catid}-{$page}.html','静态：news/1.html');
insert  into `hkcms_urlrule` values (6,'content','category',0,'list-{$catid}.html|list-{$catid}-{$page}.html','伪静态：list-1-1.html');
insert  into `hkcms_urlrule` values (7,'content','tags',0,'index.php?a=tags&amp;tagid={$tagid}|index.php?a=tags&amp;tagid={$tagid}&amp;page={$page}','动态：index.php?a=tags&amp;tagid=1');
insert  into `hkcms_urlrule` values (8,'content','tags',0,'index.php?a=tags&amp;tag={$tag}|/index.php?a=tags&amp;tag={$tag}&amp;page={$page}','动态：index.php?a=tags&amp;tag=标签');
insert  into `hkcms_urlrule` values (9,'content','tags',0,'tag-{$tag}.html|tag-{$tag}-{$page}.html','伪静态：tag-标签.html');
insert  into `hkcms_urlrule` values (10,'content','tags',0,'tag-{$tagid}.html|tag-{$tagid}-{$page}.html','伪静态：tag-1.html');
insert  into `hkcms_urlrule` values (11,'content','index',1,'index.html|index_{$page}.html','静态：index_2.html');
insert  into `hkcms_urlrule` values (12,'content','index',0,'index.html|index_{$page}.html','伪静态：index_2.html');
insert  into `hkcms_urlrule` values (13,'content','index',0,'index.php|index.php?page={$page}','动态：index.php?page=2');
insert  into `hkcms_urlrule` values (14,'content','category',1,'download.html|download_{$page}.html','静态：download.html');
insert  into `hkcms_urlrule` values (15,'content','show',1,'{$categorydir}{$id}.html|{$categorydir}{$id}_{$page}.html','静态：/父栏目/1.html');
insert  into `hkcms_urlrule` values (16,'content','show',1,'{$catdir}/{$id}.html|{$catdir}/{$id}_{$page}.html','示例：/栏目/1.html');


-- ----------------------------
-- Table structure for hkcms_user
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_user`;
CREATE TABLE `hkcms_user` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(64) NOT NULL DEFAULT '' COMMENT '用户名',
  `nickname` varchar(50) NOT NULL DEFAULT '' COMMENT '昵称/姓名',
  `password` char(32) NOT NULL DEFAULT '' COMMENT '密码',
  `bind_account` varchar(50) NOT NULL DEFAULT '' COMMENT '绑定帐户',
  `last_login_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '上次登录时间',
  `last_login_ip` varchar(40) NOT NULL DEFAULT '' COMMENT '上次登录IP',
  `verify` varchar(32) NOT NULL DEFAULT '' COMMENT '证验码',
  `email` varchar(50) NOT NULL DEFAULT '' COMMENT '邮箱',
  `remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
  `create_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '创建时间',
  `update_time` int(11) unsigned NOT NULL DEFAULT '0' COMMENT '更新时间',
  `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '状态',
  `role_id` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '对应角色ID',
  `info` text COMMENT '信息',
  PRIMARY KEY (`id`),
  UNIQUE KEY `account` (`username`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='后台用户表';

-- ---------------------------------
-- Table structure for hkcms_message
-- ---------------------------------
DROP TABLE IF EXISTS `hkcms_message`;
CREATE TABLE `hkcms_message` (
  `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '留言板id',
  `name` varchar(25) DEFAULT NULL COMMENT '姓名',
  `phone` varchar(20) DEFAULT NULL COMMENT '手机号',
  `email` varchar(100) DEFAULT NULL COMMENT '邮箱',
  `create_at` int(10) DEFAULT NULL COMMENT '留言时间',
  `content` varchar(255) DEFAULT NULL COMMENT '内容',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COMMENT='留言表';

-- ----------------------------
--  Table structure for `hkcms_article`
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_article`;
CREATE TABLE `hkcms_article` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `title` varchar(160) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `style` char(24) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `thumb` varchar(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `keywords` varchar(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `description` mediumtext COLLATE utf8_unicode_ci,
  `url` char(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '1',
  `sysadd` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `islink` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `username` char(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `inputtime` int(10) unsigned NOT NULL DEFAULT '0',
  `updatetime` int(10) unsigned NOT NULL DEFAULT '0',
  `posid` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `prefix` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tags` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `views` int(11) NOT NULL DEFAULT '0' COMMENT '点击总数',
  `yesterdayviews` int(11) NOT NULL DEFAULT '0' COMMENT '最日',
  `dayviews` int(10) NOT NULL DEFAULT '0' COMMENT '今日点击数',
  `weekviews` int(10) NOT NULL DEFAULT '0' COMMENT '本周访问数',
  `monthviews` int(10) NOT NULL DEFAULT '0' COMMENT '本月访问',
  `viewsupdatetime` int(10) NOT NULL DEFAULT '0' COMMENT '点击数更新时间',
  PRIMARY KEY (`id`),
  KEY `status` (`status`,`listorder`,`id`),
  KEY `listorder` (`catid`,`status`,`listorder`,`id`),
  KEY `catid` (`catid`,`weekviews`,`views`,`dayviews`,`monthviews`,`status`,`id`),
  KEY `thumb` (`thumb`)
) ENGINE=MyISAM AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `hkcms_article_data`
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_article_data`;
CREATE TABLE `hkcms_article_data` (
  `id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `content` mediumtext COLLATE utf8_unicode_ci,
  `paginationtype` tinyint(1) NOT NULL DEFAULT '0',
  `maxcharperpage` mediumint(6) NOT NULL DEFAULT '0',
  `template` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `paytype` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `allow_comment` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `relation` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `copyfrom` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


-- ----------------------------
--  Table structure for `hkcms_download`
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_download`;
CREATE TABLE `hkcms_download` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `typeid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `title` char(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `style` char(24) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `thumb` char(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `keywords` char(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tags` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `description` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `posid` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `url` char(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '1',
  `sysadd` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `islink` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `username` char(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `inputtime` int(10) unsigned NOT NULL DEFAULT '0',
  `updatetime` int(10) unsigned NOT NULL DEFAULT '0',
  `views` int(11) NOT NULL DEFAULT '0' COMMENT '点击总数',
  `yesterdayviews` int(11) NOT NULL DEFAULT '0' COMMENT '最日',
  `dayviews` int(10) NOT NULL DEFAULT '0' COMMENT '今日点击数',
  `weekviews` int(10) NOT NULL DEFAULT '0' COMMENT '本周访问数',
  `monthviews` int(10) NOT NULL DEFAULT '0' COMMENT '本月访问',
  `viewsupdatetime` int(10) NOT NULL DEFAULT '0' COMMENT '点击数更新时间',
  `prefix` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `status` (`status`,`listorder`,`id`),
  KEY `listorder` (`catid`,`status`,`listorder`,`id`),
  KEY `catid` (`catid`,`weekviews`,`views`,`dayviews`,`monthviews`,`status`,`id`),
  KEY `thumb` (`thumb`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `hkcms_download_data`
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_download_data`;
CREATE TABLE `hkcms_download_data` (
  `id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `template` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `paytype` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `allow_comment` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `relation` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `download` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


-- ----------------------------
--  Table structure for `hkcms_photo`
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_photo`;
CREATE TABLE `hkcms_photo` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `catid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `title` char(80) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `style` char(24) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `thumb` char(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `keywords` char(40) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `tags` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `description` char(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `posid` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `url` char(100) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `listorder` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `status` tinyint(2) unsigned NOT NULL DEFAULT '1',
  `sysadd` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `islink` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `username` char(20) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `inputtime` int(10) unsigned NOT NULL DEFAULT '0',
  `updatetime` int(10) unsigned NOT NULL DEFAULT '0',
  `views` int(11) NOT NULL DEFAULT '0' COMMENT '点击总数',
  `yesterdayviews` int(11) NOT NULL DEFAULT '0' COMMENT '最日',
  `dayviews` int(10) NOT NULL DEFAULT '0' COMMENT '今日点击数',
  `weekviews` int(10) NOT NULL DEFAULT '0' COMMENT '本周访问数',
  `monthviews` int(10) NOT NULL DEFAULT '0' COMMENT '本月访问',
  `viewsupdatetime` int(10) NOT NULL DEFAULT '0' COMMENT '点击数更新时间',
  `prefix` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `status` (`status`,`listorder`,`id`),
  KEY `listorder` (`catid`,`status`,`listorder`,`id`),
  KEY `catid` (`catid`,`weekviews`,`views`,`dayviews`,`monthviews`,`status`,`id`),
  KEY `thumb` (`thumb`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
--  Table structure for `hkcms_photo_data`
-- ----------------------------
DROP TABLE IF EXISTS `hkcms_photo_data`;
CREATE TABLE `hkcms_photo_data` (
  `id` mediumint(8) unsigned NOT NULL DEFAULT '0',
  `template` varchar(30) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `paytype` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `allow_comment` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `relation` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `imgs` text COLLATE utf8_unicode_ci,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


DROP TABLE IF EXISTS `hkcms_theme_config`;
CREATE TABLE `hkcms_theme_config` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `theme` char(50) NOT NULL COMMENT '主题名称',
  `title` char(50) NOT NULL DEFAULT '' COMMENT '配置文件名称',
  `name` char(50) NOT NULL COMMENT '配置文件名称',
  `file` char(100) NOT NULL,
  `config` text NOT NULL,
  `config_user` text NOT NULL,
  `create_at` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;


insert  into `hkcms_theme_config`(`id`,`theme`,`title`,`name`,`file`,`config`,`config_user`,`create_at`) values (6,'default','公共配置文件','config','E:\\data\\www\\www.hkcms.dome\\hkcms/hkcms/template/default/content/config.json','{\"contact\":{\"title\":\"\\u7f51\\u7ad9\\u8054\\u7cfb\\u6a21\\u5757\",\"data\":{\"username\":{\"title\":\"\\u8054\\u7cfb\\u4eba:\",\"type\":\"text\",\"value\":\"\\u5f20\\u7ecf\\u7406\",\"style\":\"width:200px;\",\"tips\":\"\"},\"tel\":{\"title\":\"\\u7535\\u8bdd:\",\"type\":\"text\",\"value\":\"020-88668888\",\"style\":\"width:200px;\",\"tips\":\"\"},\"phone\":{\"title\":\"\\u624b\\u673a:\",\"type\":\"text\",\"value\":\"13800138000\",\"style\":\"width:200px;\",\"tips\":\"\"},\"email\":{\"title\":\"\\u90ae\\u7bb1:\",\"type\":\"text\",\"value\":\"admin@hkcms.cn\",\"style\":\"width:200px;\",\"tips\":\"\"},\"address\":{\"title\":\"\\u5730\\u5740:\",\"type\":\"textarea\",\"value\":\"\\u5e7f\\u4e1c\\u7701\\u5e7f\\u5dde\\u5e02\\u767d\\u4e91\\u533a\",\"style\":\"width:200px;\",\"tips\":\"\"},\"weixin\":{\"title\":\"\\u5fae\\u4fe1\\u4e8c\\u7ef4\\u7801:\",\"type\":\"file\",\"value\":\"\",\"style\":\"width:200px;\",\"tips\":\"\",\"alowexts\":\"jpeg|jpg|png\"}}},\"compress\":{\"title\":\"\\u9996\\u9875\\u65b0\\u95fb\\u6a21\\u5757\\u662f\\u5426\\u9690\\u85cf:\",\"type\":\"select\",\"options\":[\"\\u663e\\u793a\",\"\\u9690\\u85cf\"],\"value\":\"0\",\"tips\":\"\"},\"module\":{\"title\":\"\\u9996\\u9875\\u6700\\u65b0\\u4ea7\\u54c1\\uff1a\",\"type\":\"select\",\"value\":\"0\",\"tips\":\"\\u8bf7\\u9009\\u62e9\\u680f\\u76ee\",\"source\":\"api\\/Baseinfo\\/categoryTpl\"}}','',1574415656);
